package cn.shenxingbang.chatroom.service.impl;

import cn.shenxingbang.chatroom.dao.ContentDao;
import cn.shenxingbang.chatroom.entity.UserChat;
import cn.shenxingbang.chatroom.service.intf.UserService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService{

    @Resource
    private ContentDao contentDao;

    @Override
    public UserChat getById(int id) {
        return contentDao.getById(id);
    }

    @Override
    public List<UserChat> findAllUser() {
        return contentDao.findAll();
    }

    @Override
    public UserChat insert(UserChat userChat) {
        return contentDao.save(userChat);
    }

    @Override
    public UserChat update(UserChat userChat) {
        return contentDao.save(userChat);
    }

    @Override
    public void deleteById(int id) {
        contentDao.deleteById(id);
    }

}
